package org.csu.pm.controller;

import cn.hutool.json.JSONObject;
import org.csu.pm.entity.URL;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/api")
public class ApiController {

    @GetMapping(value = "/")
    public Object api() {
        System.out.println("进来了");
        //添加URL
        JSONObject urlObject = new JSONObject();
        URL url = new URL();
        for (String i : url.urlMap.keySet()) {
            urlObject.put(i, url.urlMap.get(i));
        }

        return urlObject;
    }
}
